// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_MAINFRM_H__BC90829F_6231_41D0_A3DE_51E2D944FFF6__INCLUDED_)
#define AFX_MAINFRM_H__BC90829F_6231_41D0_A3DE_51E2D944FFF6__INCLUDED_

#include "ToolBox.h"		// Added by ClassView
#include "ColorPalette.h"	// Added by ClassView
#include "AttributeBar.h"	// Added by ClassView

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CMainFrame : public CMDIFrameWnd
{
	DECLARE_DYNAMIC(CMainFrame)
public:
	CMainFrame();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CMainFrame)
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
	//}}AFX_VIRTUAL

// Implementation
public:
	BOOL IsFullScreen();			// get whether the current state is full screen
	void VirtualEndProgress();		// virtually end the progressing
	void VirtualStartProgress();	// virtually start the progressing
	BOOL HideColorPalette();		// hide the color palette bar
	BOOL ShowColorPalette();		// show the color palette bar
	void SetProgressonStatusBar(int nPercent);	// set the current progress in progress bar
	void SetXYonStatusBar (CString strXY);		// set the x, y display on the status bar
	CColorPalette* GetColorPaletteBar();		// get the color palette bar
	CAttributeBar* GetDrawAttributeBar();		// get the attribute bar
	virtual ~CMainFrame();						// destroy
	void DockControlBarLeftOf(CDialogBar* Bar, CToolBar* LeftOf);
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:  // control bar embedded members
	CStatusBar  m_wndStatusBar;		// the status bar ctrl
	CToolBar    m_wndToolBar;		// the tool bar ctrl
	CToolBox	m_wndToolBox;		// the tool box ctrl
	CColorPalette m_wndColorPalBar;	// the color palette ctrl
	CAttributeBar m_wndAttributeBar;// the attribute bar ctrl

	BOOL	m_wndStatusBarVisible;	// the visibility of status bar
	BOOL	m_wndToolBarVisible;	// the visibility of tool bar
	BOOL	m_wndToolBoxVisible;	// the visibility of tool box
	BOOL	m_wndColorPalBarVisible;// the visibility of color palette
	BOOL	m_wndAttributeBarVisible;// the visibility of attribute bar

// Generated message map functions
protected:
	BOOL m_bIsFullScreen;			// indicate the full screen state.
	CMenu m_wndMenu;				// the menu ctrl
	CProgressCtrl m_wndProgress;	// the progress ctrl in the status bar
	BOOL CreateAttributeBar();		// create the attribute bar
	BOOL CreateColorPalette();		// create the color palette
	BOOL CreateStatusBar();			// create the status bar
	BOOL CreateToolBar();			// create the tool bar
	BOOL CreateToolBox();			// create the tool box

	//{{AFX_MSG(CMainFrame)
	/* The framework calls this member function when an application
	 requests that the Windows window be created by calling the Create
	 or CreateEx member function. */
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	
	/* The framework calls this member function as a signal that
	 the CWnd or an application is to terminate.*/
	afx_msg void OnClose();
	
	// calls this member function after the window's size has changed
	afx_msg void OnSize(UINT nType, int cx, int cy);

	/* The framework calls this member function for all top-level windows
	 after the window with input focus has realized its logical palette, 
	 thereby changing the system palette. */
	afx_msg void OnPaletteChanged(CWnd* pFocusWnd);

	// when the user choose to make the screen full and click F11
	afx_msg void OnViewFullscreen();

	afx_msg void OnMenuSetback();
	afx_msg void OnMenuSetfore();
	afx_msg void OnWelcome();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_MAINFRM_H__BC90829F_6231_41D0_A3DE_51E2D944FFF6__INCLUDED_)
